import 'package:flutter/material.dart';

import '../../request/api_manager.dart';
import '../request/my_interceptors_wrapper.dart';

class RecordBrowseManager  {


  static addRecordBrowse(Map detailMap){

    Map<String, dynamic> params = {};
    params["channel"] = detailMap["channel"];
    params["channelItemNo"] = detailMap["channelItemNo"];
    params["mainImage"] = detailMap["mainImage"];
    params["price"] = detailMap["price"];
    params["star"] = detailMap["star"]??0;
    params["title"] = detailMap["title"];
    params["spuId"] = detailMap["spu"];

    // params["channelItemNo"] = detailModel?.channelItemNo??"";
    // params["mainImage"] = detailModel?.mainImage??"";
    // params["price"] = detailModel?.price??0.0;
    // // params["spuId"] = detailModel?.spuId??"";
    // params["star"] = detailModel?.star??0.0;
    // params["title"] = detailModel?.title??"";

    /*
    *
    *   "channel": "",
  "channelItemNo": "",
  "mainImage": "",
  "price": 0,
  "spuId": 0,
  "star": 0,
  "title": ""
    *
    * */


    ApiManager.addUserBrowseProduct(params,success: (res){

      LogUtilDH.print("${params["title"]} 打点成功");
    },fail: (error){

    });
  }

}